﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace Twinkle
{
    public static class Kernel
    {
        public static Plugin Plugin = null;
        public static void Init(Plugin p)
        {
            Plugin = p;
            Storage = new Twinkle.Data.Storage();
            Config = Twinkle.Data.Config.LoadConfig();
            if (Config.Behavior.TagAutoBindingData != null)
            {
                foreach (var tag in Config.Behavior.TagAutoBindingData)
                {
                    if (!String.IsNullOrEmpty(tag.Tags))
                    {
                        foreach (var t in tag.Tags.Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries))
                        {
                            Storage.AddHashtag(t);
                        }
                    }
                }
            }
        }

        public static Data.Config Config = null;

        public static Data.Storage Storage = null;

        public static class ImagesCache
        {

            public static Image RTImage = Properties.Resources.rt;

            public static Image URTImage = Properties.Resources.rtp;

            public static Image QTImage = Properties.Resources.qt;
        }
    }
}
